package demo2;

import demo1.TestDemo;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 30318
 * Date: 2023-05-20
 * Time: 17:06
 */
class A{

}
class B extends A{

}
final class C extends B{
//这个类将不能被继承

}

class Student{

}
class Teacher{

}
class School{
    //属性 / 字段
    public Student[] students;
    public Teacher[] teachers;
}

public class Test extends TestDemo {

    public static void function(){

    }

    public static void function(int a){

    }

    public static void function(int a, int b){

    }

    public static void main(String[] args) {
        //静态绑定 - 编译的时候 根据你传入的参数 能够确定你所调用的哪个方法
        function();
        function(1);
        function(1, 2);

    }

    public void func2(){
        final int a = 10;
        //a = 100;
    }

    public void test(){

        //TestDemo testDemo = new TestDemo();
        //System.out.println(testDemo.a);
        System.out.println(super.a);
    }

    public static void main1(String[] args) {
        Test t = new Test();
        t.test();
    }
}
